#pragma once

#include <functional>

//任务形式2
using task_t = std::function<void()>;

//任务形式1
class Task
{
public:
    Task(int x, int y)
        : _x(x),
          _y(y)
    {}

    int X()
    {
        return _x;
    }

    int Y()
    {
        return _y;
    }
    int Excute()
    {
        _result = _x + _y;
        return _result;
    }
    ~Task()
    {}
private:
    int _x;
    int _y;
    int _result;
};